package com.wanda.controller;

import java.util.List;

import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.wanda.po.Projects;
import com.wanda.po.ProjectsExample;
import com.wanda.service.ProjectService;
import com.wanda.service.impl.ProjectServiceImpl;

@Controller
@RequestMapping("/project")
public class ProjectController {
	
	@Autowired
	private ProjectServiceImpl projectService;
	
	@RequestMapping("/query")
	public String queryProjict(HttpSession session)throws Exception{
		int num=(Integer) session.getAttribute("num");
		System.out.println("==========="+num);
		
		ProjectsExample projectEample=new ProjectsExample();
		List<Projects> projectList=projectService.selectByExample(projectEample);
		session.setAttribute("projectList", projectList);
		return "ProjectList";
	}
}
